package com.zzccyy.jpdemo.utils;


import android.widget.TextView;

import androidx.core.content.ContextCompat;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zzccyy.jpdemo.R;
import com.zzccyy.jpdemo.bean.JpBean;
import com.zzccyy.jpdemo.bean.JpBean.DataBean;


public class ListAdapter extends BaseQuickAdapter<JpBean.DataBean, BaseViewHolder> {


    public ListAdapter(int layoutResId) {
        super(layoutResId);

    }


    @Override
    protected void convert(BaseViewHolder helper, JpBean.DataBean item) {
        TextView ttTime1 = helper.getView(R.id.ttTime1);
        TextView ttTime2 = helper.getView(R.id.ttTime2);
        TextView ttAdd1 = helper.getView(R.id.ttAdd1);
        TextView ttAdd2 = helper.getView(R.id.ttAdd2);
        TextView ttA = helper.getView(R.id.ttA);

        ttTime1.setText(item.startTime);
        ttTime2.setText(item.endTime);
        ttAdd1.setText(item.startAirport);
        ttAdd2.setText(item.endAirport);
        ttA.setText(item.flightAirways + item.flightId);

   }

}

